/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package lucava.metamodel.uspeed;

import lucava.metamodel.uspeed.visitor.IElementVisitor;

/**
 *
 * @author glenn
 */
public class RelationElement extends TypedElement {

    /**
     * Cardinalité coté classe source.
     */
    protected String sourceCard = null;
    /**
     * Cardinalité coté classe cible.
     */
    protected String targetCard = null;
    /**
     * Classe cible.
     */
    protected String targetClass = null;
    /**
     * Si la relation est uni directionnelle.
     */
    protected Boolean directional = false;

    public String getSourceCard() {
        return sourceCard;
    }

    public void setSourceCard(String sourceCard) {
        this.sourceCard = sourceCard;
    }

    public String getTargetCard() {
        return targetCard;
    }

    public void setTargetCard(String targetCard) {
        this.targetCard = targetCard;
    }

    public String getTargetClass() {
        return targetClass;
    }

    public void setTargetClass(String targetClass) {
        this.targetClass = targetClass;
    }

    public Boolean isDirectional() {
        return this.directional;
    }

    public void setDirectional(Boolean direct) {
        this.directional = direct;
    }

    @Override
    public void accept(IElementVisitor visitor) {
        visitor.enterRelation(this);
        visitor.leaveRelation(this);
    }
}
